Duke Linux VMs: Getting Started

1 Setting up your Virtual Machine

  1. Go to the Duke Virtual Computing Manager (VCM) web site: https://vcm.duke.edu/ and login with your NetID

  2. Choose the “Reserve a VM” button (Figure 1).

Figure 1: Duke Virtual Computing Manager (VCM) webpage
  1. From the next page choose the “Linux” tab (Figure 2).

Figure 2: Duke VCM create a VM, Step 1
  1. Choose “Ubuntu Server 22.04 (Jammy Jellyfish)” (Figure 3).
    • Agree to the Duke VCM Terms of Use

Figure 3: Duke VCM create a VM, Step 2
  1. From the VM Management page “Power on” your virtual machine (Figure 4).

    • When you first reserve your VM it will take a few minutes for the instance to be setup. You will receive an email when your VM is ready to be used.

    • By default, will power down every morning at 6am. You will need to remember to power on your VM each day.

    • If you want to keep your VM running continuously than uncheck the “Automatic power downs?” radio button. The VM manager page will ask you to justify this. You can enter text like “Long running jobs”.

Figure 4: Duke VCM Manager
  1. Make note of your VM hostname: Your VM’s “hostname” is displayed on the management page. It will be of the form vcm-XXXX.vm.duke.edu. where vcm-XXXX is your specific hostname (Figure 4).

2 Connecting to your VM via SSH

SSH (Secure SHell) is a command line program that allows us to connect to remote computers and to execute commands on those remote computers. SSH is available by default on modern MacOS and Windows operating systems.

  1. Start your terminal (Figure 5).

    • MacOS: Run the “Terminal” program
    • Windows: Run the “Powershell” program

Figure 5: Windows Powershell
  1. Run the SSH command (Figure 6).

    • In the terminal type the following command, replacing netid with your NetID and vcm-XXXX with the appropriate VM hostname as shown in the Duke VM Manager page

      ssh netid@vcm-XXXX.vm.duke.edu

Figure 6: Windows Powershell, SSH
  1. The first time you connect via SSH you will get a warning message like the following (Figure 7).

    This is a safety check; go ahead and type yes to continue connecting:

    The authenticity of host 'vcm-XXXX.vm.duke.edu (YY.YY.YY.YY)' can't be established.
    ....
    Are you sure you want to continue connecting (yes/no/[fingerprint])?

Figure 7: SSH confirm connection
  1. SSH will be prompt you to enter your password. Enter your NetID password here (Figure 8).
Important

IMPORTANT: The characters you type will NOT be echoed on the screen when you type them at the SSH password prompt.

It is important you type your password slowly and correctly. If you miss-enter your password you will get prompted again. After several miss-entries in a row SSH will close the connection as you’ll need to start again from Step 2 above.

Figure 8: SSH enter password, nothing echoed
  1. Confirm that the SSH command succeeded.

    If you correctly entered the SSH command line, and type your password correctly, then you should see welcome text from your VM as shown in Figure 9.

    If you did not connect to your VM check the following:

    • Did you enter the correct VM hostname?
    • Did you specify your NetID in the SSH command?
    • Did you enter the correct password (remember, the characters you type will not be echoed)

Figure 9: SSH, successful login
  1. Run a few test commands on your VM (Figure 10).

    Type the following command in your SSH session:

    uname -a

    and

    whoami

    uname prints out some basic info about your VM’s operating system.

    whoami returns the name of the user who executes the command.

Figure 10: SSH, confirmation commands
  1. Create an empty file in your VM’s home directory (Figure 11).

    We will create an empty file in your home directory so when we connect via Cyberduck (below) we can confirm that there’s at least one file on our VM.

    touch TEST_FILE.txt

    The touch command creates an empty file (if the file doesn’t exist) or updates a file’s “timestamp” (when it was last acccessed)

Figure 11: SSH, create a file in your home directory

3 Connecting to your VM via Cyberduck

Cyberduck is a “FTP/SFTP client” – a program that allows us to connect to a remote computer (e.g. your VM) to upload and download files to and from our local computer (e.g. your laptop).

Cyberduck is free to use, though the program will occasionally prompt your for a donation and/or encourage you to register.

  1. Download Cyberduck from https://cyberduck.io/ and install it via the standard program installation procedure on your operating system

  2. Click the “Open Connection” button in Cyberduck (Figure 12)

Figure 12: Cyberduck
  1. Change the connection protocol to “SFTP” (Figure 13)

    Cyberduck defaults to FTP connections. Choose “SFTP” instead from the pull down menu at the top of the “Open Connections” dialog box.

Figure 13: Cyberduck, choose sftp
  1. Fill out the rest of the “Open Connection” dialog box with your VM hostname (vcm-XXXX.vm.duke.edu), your username (NetID), and password (NetID password) (Figure 14).

    Once the dialog is filled out click the “Connect” button at the bottom of the dialog.

Figure 14: Cyberduck, filled connection dialog
  1. Check that Cyberduck has connected to your VM (Figure 15).

    If you’ve filled out the Open Connection dialog correctly and successfully connected to your VM, then Cyberduck should default to showing the files and directories in your home directory.

    If this is the first time you’re connecting, then you should see a single file TEST_FILE.txt (assuming you followed the prior directions under the SSH section of this document).

    If you create a file in the command line via SSH, you may need to “Refresh” Cyberduck to get the list of files/directories to update (red arrow in Figure 15).

Figure 15: Cyberduck, connected